package com.sg.controller.bff;

import com.sg.service.biz.bff.TemplateEngineService;
import com.sg.dto.biz.bff.req.*;
import com.sg.dto.biz.bff.res.*;
import com.sg.common.ro.OkrResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author ：
 * @version 1.0
 * @date ：
 */
@Api(value = "TemplateEngine", tags = {"TemplateEngine"})
@RestController
// @RequestMapping("/oms/templateEngine/")
public class TemplateEngineController {

    @Autowired
    TemplateEngineService templateEngineService;

    /**
     * B2生成回退预制消息内容
     * gen by moon at 2/13/2024, 10:50:57 AM
     */
    @PostMapping("/oms/templateEngine/generateBackPrefabricateMsgContent")
    @ApiOperation(value = "B2生成回退预制消息内容", response = OkrResult.class)
    public OkrResult<BffGenerateBackPrefabricateMsgContentRespDto> generateBackPrefabricateMsgContent(@RequestBody(required = false) @Validated BffGenerateBackPrefabricateMsgContentReqDto reqDTO) {
        return OkrResult.success(templateEngineService.generateBackPrefabricateMsgContent(reqDTO));
    }
}
